﻿<div class="layui-row">
    <div>链接生成成功, 复制链接分享给好友吧</div>
    <div>
        <input type="text" style="border: 0px;" id="shareId"
               placeholder="" class="layui-input">
    </div>
</div>
<script type="text/javascript">
    id = workUtils.get("id");
    function getContextPath() {
        var protocol = window.location.protocol;
        var host = window.location.host;
        var pathName = document.location.pathname;
        var index = pathName.substr(1).indexOf("/");
        var result = pathName.substr(0, index + 1);
        return protocol + "//" + host + result;
    }
    $.getJSON("../note/genshare/" + id, function (data) {
        $("#shareId").val(getContextPath() + "/open/note/" + data.shareId);
    });
</script>